package de.uni.muenster.idw2.location.bluetooth.service.fingerprinting.core;

import de.uni.muenster.idw2.location.bluetooth.service.fingerprinting.images.PixelPosition;
import de.uni.muenster.idw2.location.bluetooth.service.transformations.CWPoint;
import de.uni.muenster.idw2.location.bluetooth.service.transformations.GkPoint;
import de.uni.muenster.idw2.location.bluetooth.service.transformations.Similarity;
import de.uni.muenster.idw2.location.bluetooth.service.transformations.SimilarityTransformer;
import de.uni.muenster.idw2.location.bluetooth.service.transformations.TransformCoordinates;

/**
 * This class offers the transformation methods for the fingerprinting part.
 * 
 * @author Eva Peters
 *
 */
public class FingerprintingTransformation 
{
	/**
	 * The region: <country telephone code>00.
	 * Here: Germany
	 */
	private final int REGION = 4900;
	/**
	 * Transforms WGS84 coordinates into pixel coordinates.
	 * 
	 * @param latitude The WGS84 latitude.
	 * @param longitude The WGS84 longitude.
	 * @return The pixel position.
	 */
	public PixelPosition wgs84ToPixel(double latitude, double longitude)
	{
		CWPoint cwPoint = new CWPoint(latitude, longitude);
		GkPoint gkPoint = TransformCoordinates.wgs84ToGk(cwPoint, REGION);
		
		double northing = gkPoint.getNorthing();
		double easting = gkPoint.getGkEasting(REGION);
		
//		SimilarityTransformer.
		
		//TODO
		return null;
	}
	
	/**
	 * Transforms pixel coordinates into WGS84 coordinates.
	 * 
	 * @param position The pixel coordinates.
	 * @return The WGS84 coordinates.
	 */
	public CWPoint pixelToWgs84(PixelPosition position)
	{
		//TODO
		return null;
	}
}
